package org.szy.plugin.dev.service;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import org.noear.solon.core.handle.UploadedFile;
import org.szy.core.common.page.QueryPage;
import org.szy.core.common.service.BaseService;
import org.szy.core.common.param.CommonStatusParam;
import org.szy.plugin.dev.entity.DevFile;
import org.szy.plugin.dev.param.DevFileQueryParam;
import org.szy.plugin.dev.param.DevFileUploadParam;

import java.io.Serializable;
import java.util.List;

/**
 * 开发_文件Service接口
 *
 * @author wangbuhao
 * @since 2023-06-28 18:17:40
 **/
public interface DevFileService extends BaseService<DevFile> {

    /**
     * 获取开发_文件查询Wrapper
     *
     * @author wangbuhao
     * @since 2023-06-28 18:17:40
     */
    QueryWrapper qwByQuery(DevFileQueryParam param);

    /**
     * 获取开发_文件分页
     *
     * @author wangbuhao
     * @since 2023-06-28 18:17:40
     */
    Page<DevFile> page(QueryPage<DevFile> page, DevFileQueryParam param);

    List<DevFile> list(DevFileQueryParam param);

    /**
     * 上传文件
     *
     * @param file               文件信息
     * @param devFileUploadParam 文件参数
     */
    DevFile upload(UploadedFile file, DevFileUploadParam devFileUploadParam);

    /**
     * 修改 关联标识
     * @param applyTo 关联名称
     * @param refNum 关联标识
     * @param targetNum 需要修改的值
     */
    boolean modifyRefNumByApplyAndRef(String applyTo,Long refNum,Long targetNum);

    List<DevFile> listByApplyAndRef(String applyTo, Long refNum);

    List<DevFile> listByApplyAndRefAndCategory(String applyTo, Long refNum, String category);
}
